import { defineStore } from 'pinia'


export const useStore = defineStore('main', {
  state: () => ({
    userInfo: {},
  }),
  actions: {
    setUserInfo(userInfo) {
      this.userInfo = userInfo;
    },
    login() {
      this.isLoggedIn = true;
    },
    logout() {
      this.userInfo = null;
      this.isLoggedIn = false;
    }
  }
})